import java.util.Arrays;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: dell
 * Date: 2023-12-19
 * Time: 11:35
 */
public class test3 {
    public static int mygcd(int a,int b){
        return b==0 ? a:mygcd(b,a%b) ;//利用辗转相除法求得最大公约数
    }
    public static void main(String[] args) {
        double small=0.5;
        String smalltwo=small+"";
        String[] myarray=new  String[2];
        myarray=smalltwo.split("\\.");
        System.out.println(myarray[1]);
        int wei= myarray[1].length();
        int fm=(int)Math.pow(10,wei);
        int zi=Integer.parseInt(myarray[1]);
        System.out.println(zi);
        System.out.println(fm);
        int yueshu=mygcd(zi,fm);
        System.out.println(zi/yueshu+"/"+fm/yueshu);
    }
}